#unable to compile out of source tree
pkg_name=perl
version=5.20.2
src_dir=$src_dir_root/$pkg_name-$version
url=http://www.cpan.org/src/5.0/$pkg_name-$version.tar.gz

cd "$src_dir_root"
rm -Rf "$pkg_name-$version"
tar zxf "$pkg_name-$version.tar.gz"

cd $src_dir

#without adding manually our include directory, perl configure will fail pitifully
./Configure				\
	-des				\
	-Dprefix=/libexec/libvpx-perl	\
	-A locincpth=/include

make OPTIMIZE=-O0

install_tmp_dir=/tmp/$pkg_name-$version
rm -Rf "$install_tmp_dir"
mkdir -p "$install_tmp_dir"
make install "DESTDIR=$install_tmp_dir"

install_dirs "$builders_dir_root/libvpx/tmp.kludge0.dirs"
install_files "$builders_dir_root/libvpx/tmp.kludge0.files" "$install_tmp_dir"
elf_strip "$builders_dir_root/libvpx/tmp.kludge0.elf-strip"

rm -Rf "$install_tmp_dir"
rm -Rf "$src_dir"
rm -f /usr/bin/perl
